<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width = device-width, initial-scale = 1.0, minimum-scale = 1.0, maximum-scale = 1.0, user-scalable = no"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta name="keywords" content="" /> 
<meta name="description" content="" />
<title>填写银行卡</title>
<link type="text/css" href="../css/reset.css" rel="stylesheet" />
<link type="text/css" href="../css/public.css" rel="stylesheet" />
<link type="text/css" href="../css/style.css" rel="stylesheet" />
<link type="text/css" href="../css/wode.css" rel="stylesheet" />
<script>
    var deviceWidth = Math.min(640, window.innerWidth)
    document.documentElement.style.fontSize = deviceWidth / 7.5 + "px"
</script>
<script src="../js/jquery-3.0.0.min.js"></script>
<script src="../js/core.js"></script>
<script src="../js/bankCard.js"></script>
<script src="../js/12.7.9shezhiyinghangkaadd.js"></script>
</head>

<body>
<!-- top -->
<div class="header">
    <header class="p_header public-red">
        <a href="javascript:history.go(-1);" class="p_header_left">
            <i class="p_left" title="返回"></i>
        </a>
        <h1 class="p_dizhi">填写银行卡</h1>
    </header>
</div>
<!--填写银行卡-->
<div class="main_bank">
    <div>
        <p>请绑定持卡人本人的银行卡</p>
        <ul class="bank_link">
            <li>
                <span>持卡人</span>
                <input type="text" id="userName" placeholder="请输入持卡人姓名">
                <div class="a_line"></div>
            </li>
            <li class="a_list">
                <span>卡号</span>
                <input type="number" id="bankNumber" onchange="jianting()" placeholder="请输入银行卡卡号">
            </li>
        </ul>
    </div>
    <div>
        <p>请选择银行类型(不支持信用卡)</p>
        <ul class="bank_link">
            <li class="a_bank_img" >
                <span>卡类型</span> 
                <em class="leixing">自动填充(不支持信用卡)</em>
               
            </li>
            <li>
                <span>手机号</span>
                <input type="text" id="phone" placeholder="请输入银行预留手机号">
            </li>
            <li class="a_list">
                <span>地址</span>
                <input type="text" id="address" placeholder="请输入开户行地址">
            </li>
        </ul>
    </div>
    <!--<div class="dizhi_add mid-width clearfix">
        <div class="fl">
            <input type="checkbox" id="checkbox-1-1" class="regular-checkbox" checked /><label for="checkbox-1-1"></label>
        </div>
        <span>设为默认地址</span>
    </div>-->
</div>
<div class="mid-width">
    <input type="button"  onclick="addyinghangka()" class="p_button" value="确认添加">
</div>


<script>
	  function jianting(){
	  	var yinhanming="";
	   var bankInfo = bankCardAttribution($("#bankNumber").val());
	       var sun=0;
	       if(bankInfo!="error"){
	       	 $.each(bankInfo, function(q,w) {
	       	 	sun++;
	       	 	  if(sun==1){
	       	 	  	yinhanming=w;
	       	 	  	 }
	       	 	  	if(sun==3){
	               	  if(w=="DC"){
	               	  	$(".leixing").html(yinhanming+"-储蓄卡");
	               	  }else{
	               	  	$(".leixing").html("不支持该类型银行卡");
	               	  }
	               }
	           });
	       }else{
	       		$(".leixing").html("不支持该类型银行卡");
	       }
	  }
</script>
</body>
</html>